package com.taijihuabao.modules.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.taijihuabao.common.commonutils.LongToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 角色-权限中间表
 *
 * @author Wang
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel("角色-权限中间表")
public class RolePermissionEntity extends BaseEntity {

    /**
     * 主键
     */
    @ApiModelProperty("主键")
    @JsonSerialize(using = LongToStringSerializer.class)
    private Long id;

    /**
     * 角色id
     */
    @ApiModelProperty("角色id")
    @JsonSerialize(using = LongToStringSerializer.class)
    private Long rid;

    /**
     * 权限id
     */
    @ApiModelProperty("权限id")
    @JsonSerialize(using = LongToStringSerializer.class)
    private Long pid;

    public RolePermissionEntity() {
    }

    public RolePermissionEntity(Long rid, Long pid) {
        this.rid = rid;
        this.pid = pid;
    }

}
